package com.hp.service.impl;

import com.hp.dao.ItemDao;
import com.hp.entity.Item;
import com.hp.service.IItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LiuQiang
 * @Date: 2021/10/29 11:24
 */
@Service
public class ItemServiceImpl implements IItemService {

    @Autowired
    private ItemDao itemDao;

    @Override
    public List<Item> findItemById(Integer id) {
        return itemDao.findItemById(id);
    }

    @Override
    public int itemDeleteById(Integer orderId) {
        return itemDao.itemDeleteById(orderId);
    }

    @Override
    public List<Item> findItemByOrderId(Integer id) {
        return itemDao.findItemByOrderId(id);
    }

    @Override
    public int insertItem(Item item) {
        return itemDao.insertItem(item);
    }
}
